﻿using System;

namespace ErrorDumper.Filtering {
    public abstract class ExceptionFilterBase : IExceptionFilter {

        public virtual ExceptionHandlingLevel? GetLevel(ExceptionPropertyCollection properties, Exception exception) {
            if (properties != null) {
                var level = GetLevel(properties);
                if (level.HasValue)
                    return level;
            }
            return null;
        }

        public virtual ExceptionHandlingLevel? GetLevel(ExceptionPropertyCollection properties, string content) {
            if (properties != null) {
                var level = GetLevel(properties);
                if (level.HasValue)
                    return level;
            }
            return null;
        }

        public virtual ExceptionHandlingLevel? GetLevel(ExceptionPropertyCollection properties) {
            return null;
        }
    }
}